package com.yl.web.controller.api;

import com.yl.common.core.domain.AjaxResult;
import com.yl.domain.StudentReplyDO;
import com.yl.service.StudentReplyService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RequestMapping("/reply/")
@RestController
public class StudentReplyController {

    private static final Logger log = LoggerFactory.getLogger(StudentReplyController.class);

    @Resource
    StudentReplyService studentReplyService;


    @RequestMapping("/save")
    @ResponseBody
    public AjaxResult save(@RequestBody StudentReplyDO studentReplyDO) {
        log.info("学生回答问题提交结果====学生id - {}==,\n 全部参数 - {}", studentReplyDO.getUserId(),studentReplyDO);
        return studentReplyService.save(studentReplyDO);
    }

}
